﻿using System;
using System.Collections.Generic;
using System.Text;
using Obvious.Framework.Logging.Abstracts;
using Obvious.Framework.Logging.ConfigHandlers;
using Obvious.Framework.Logging.Enums;
using Obvious.Framework.Logging.Implementation;

namespace Obvious.Framework.Logging.Factory
{
    public class LogFactory
    {

        private LogFactory()
        { 
        }
        public static LoggingProvider GetInstance(string configName)
        {
            LoggingProvider logger = null;
            LoggerProviderElement element = LogConfigHandler.GetProviderElement(configName);
            switch (element.Type)
            { 
                case LoggerType.DB:
                    logger = (LoggingProvider)(new DBLogProvider(configName));
                    break;
            }
            return logger;
        }
    }
}
